﻿using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.Framework.Reflection;
using Pixysoft.Weblications.Sango.Dao;
using Pixysoft.Weblications.Sango.Constant;
using Pixysoft.Weblications.Sango.Formular;
using Pixysoft.Weblications.Sango.Environment;

namespace Pixysoft.Weblications.Sango.Command.player
{
    partial class SangoPlayerHandler
    {
        public player_actioncooldowninfo player_actioncooldowninfo()
        {
            string userCode = SangoManager.Authentication();
            player_actioncooldowninfo response = ReflectionManager.CreatePojo<player_actioncooldowninfo>();
            response.Succeed = false;

            Entities.Usr_Queue usrQueue = UsrQueueDao.getRunningQueue(userCode, CtiQueueTypecodeCollection.BATTLE, userCode);

            if (usrQueue == null)
            {
                response.Message = "无冷却队列";
                return response;
            }

            Entities.Sys_Queue sysQueue = SysQueueHelper.searchByCode(usrQueue.Queueserialcode);

            response.gold = QueueFormular.getQueueCooldownGoldPrice(usrQueue, sysQueue);
            response.Succeed = true;
            return response;
        }


    }
    public interface player_actioncooldowninfo : ISangoResponse
    {
        long gold { get;set;}
    }
}
